// First step
cd ./runtime_core
git status | grep "modified:  " > changed_files.out
sed -r -i 's/   modified:   //' changed_files.out


// 202x-202x - change to 202x-2025
// Check first (without -i)
for line in `cat changed_files.out`; do sed -E 's/(.*Copyright.*)\s(20[012][0-9])-(20[012][0-9])/\1 \2-2025/' "$line"; done

for line in `cat changed_files.out`; do sed -i -E 's/(.*Copyright.*)\s(20[012][0-9])-(20[012][0-9])/\1 \2-2025/' "$line"; done

// change all 20xx to 2024-2025
// Check first (without -i)
for line in `cat changed_files.out`; do sed -E 's/(.*Copyright.*)\s(20[012][0-9]) /\1 \2-2025 /' "$line"; done

for line in `cat changed_files.out`; do sed -i -E 's/(.*Copyright.*)\s(20[012][0-9]) /\1 \2-2025 /' "$line"; done


// Check
// Should be equals to number of files
for line in `cat changed_files.out`; do grep 'Copyright.*202[0-9]' "$line"; done |wc -l  

// Their sum should be equals to lines number
for line in `cat changed_files.out`; do grep 'Copyright (c) 202[0-9]-202[0-9] ' "$line"; done | wc -l
for line in `cat changed_files.out`; do grep 'Copyright (c) 202[0-9] ' "$line"; done | wc -l

// After all changes all CPRs should be 202x-2025, si number equals to number of changed files
for line in `cat changed_files.out`; do grep 'Copyright (c) 202[0-9]-2025 ' "$line"; done | wc -l


// this should be 0 after all changes INCORRECT !!!
for line in `cat changed_files.out`; do grep 'Copyright (c).*^-2025 ' "$line"; done | wc -l
